//
//  LetterDetailView.m
//  DirectProDuct
//
//  Created by hl on 16/1/22.
//  Copyright (c) 2016年 ping. All rights reserved.
//

#import "LetterDetailView.h"

@implementation LetterDetailView
-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createdSubView];
    }
    return self;
}
-(void)createdSubView{
    self.sendPeopleLab = [[UILabel alloc] init];
    self.receivePeopleLab = [[UILabel alloc] init];
    self.timeLab = [[UILabel alloc] init];
    NSArray *labArr = @[self.sendPeopleLab,self.receivePeopleLab,self.timeLab];
    for (int i = 0; i<labArr.count; i++) {
        UILabel *lab = [labArr objectAtIndex:i];
        lab.frame = CGRectMake(15 * _kscW, 20 * _kscH + 35 * _kscH*i, KScreenWidth - 30 * _kscW, 25 * _kscH);
        lab.font = [UIFont systemFontOfSize:13.0];
        [self addSubview:lab];
        
        UILabel *lineLab = [[UILabel alloc] initWithFrame:CGRectMake(lab.left, lab.bottom + 3 * _kscH, lab.width, 1 * _kscH)];
        lineLab.backgroundColor = XiaHuaXianCOLOR;
        [self addSubview:lineLab];
    }
    
    self.mainTextView = [[UITextView alloc] initWithFrame:CGRectMake(self.sendPeopleLab.left, self.timeLab.bottom + 10 * _kscH, self.timeLab.width, KScreenHeight - 78 - self.timeLab.bottom - 10 * _kscH - 55 * _kscH)];
    self.mainTextView.layer.cornerRadius = 5;
    self.mainTextView.clipsToBounds = YES;
    self.mainTextView.layer.borderWidth = 0.8 * _kscH;
    self.mainTextView.layer.borderColor = XiaHuaXianCOLOR.CGColor;
    self.mainTextView.editable = NO;
    self.mainTextView.font = [UIFont systemFontOfSize:13.0];
    self.mainTextView.returnKeyType = UIReturnKeyDone;
    [self addSubview:self.mainTextView];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
